﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Script.Serialization;
using ElGee.Google.Charts;

namespace WebApp.AreaChartSample
{
    public partial class _1_Manual : System.Web.UI.Page
    {
        protected string _json;
        protected string _chartOptions;
        protected string _hashKey;

        protected void Page_Load(object sender, EventArgs e)
        {
            // Find the Construction of the DataSource in /Data/LineChartData
            ChartDataSource ds = AreaChartData.GetDataSource();

            // Find the Construction of the Options in /Data/LineChartData
            AreaChart chart = AreaChartData.GetOptions();

            // Use _json and _chartOptions to fill the manual JQuery PlugIn
            _json = new JavaScriptSerializer().Serialize(ds);
            _chartOptions = chart.GetJsOptions();
            _hashKey = chart.HashKey();
        }
    }
}